﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:WP_Customer_ShopMob"
    xmlns:Controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    x:Class="WP_Customer_ShopMob.Views.SousCategoriesPage"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait" 
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contient le nom de l'application et le titre de la page-->
        <StackPanel Grid.Row="0" Margin="0,0,0,0" RenderTransformOrigin="0.502,0.508">
            <StackPanel Background="White" Margin="0,0,0,10" Height="111">
                <Image Source="/shopmob.png" Height="117" Margin="104,0" />
                <Rectangle Fill="#FF0A8DD8" HorizontalAlignment="Left" Height="6" Margin="-1,-10,0,0" Stroke="Transparent" VerticalAlignment="Top" Width="485"/>
            </StackPanel>

            <TextBlock Text="{Binding Nom}" Margin="10,0,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="60" FontFamily="Eras Demi ITC" Foreground="#FF0A8DD8" Height="83" HorizontalAlignment="Left" Width="470" RenderTransformOrigin="0.501,0.455"/>
        </StackPanel>

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" >
            <Controls:Pivot x:Name="pivot">
                <Controls:PivotItem Header="{Binding Nom}">
                    <ListBox x:Name="lst_categories" ItemsSource="{Binding ListSousCategories}" SelectionChanged="lst_categorie_SelectionChanged_1">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Margin="0,0,0,17">
                                    <TextBlock Text="{Binding Nom}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Controls:PivotItem>
                <Controls:PivotItem Header="Mon compte" DataContext="{Binding Compte}">
                    <ScrollViewer>
                        <Grid Height="610">
                            <StackPanel Margin="0,0,0,530">
                                <TextBlock Text="Identifiant:" Style="{StaticResource PhoneTextNormalStyle}" />
                                <TextBlock Name="txt_id" Text="{Binding IdClient}" Height="30"  />
                            </StackPanel>
                            <StackPanel Margin="0,70,0,469">
                                <TextBlock Text="Nom:" Style="{StaticResource PhoneTextNormalStyle}" />
                                <TextBlock Name="txt_nom" Text="{Binding Nom}" Height="30"  />
                            </StackPanel>
                            <StackPanel Margin="0,140,0,394">
                                <TextBlock Text="Prenom:" Style="{StaticResource PhoneTextNormalStyle}" />
                                <TextBlock Name="txt_prenom" Text="{Binding Prenom}" Height="30"  />
                            </StackPanel>
                            <StackPanel Margin="0,210,0,332">
                                <TextBlock Text="Email:" Style="{StaticResource PhoneTextNormalStyle}"/>
                                <TextBlock Name="txt_email" Text="{Binding Email}" Height="30"  />
                            </StackPanel>
                            <StackPanel Margin="0,280,0,259">
                                <TextBlock Text="Code postal:" Style="{StaticResource PhoneTextNormalStyle}" />
                                <TextBlock Name="txt_cp" Text="{Binding Cp}" Height="30"  />
                            </StackPanel>
                            <StackPanel Margin="0,350,0,188">
                                <TextBlock Text="Ville:" Style="{StaticResource PhoneTextNormalStyle}" />
                                <TextBlock Name="txt_ville" Text="{Binding Ville}" Height="30"  />
                            </StackPanel>
                            <StackPanel Margin="0,420,0,121">
                                <TextBlock Text="Tél fixe:" Style="{StaticResource PhoneTextNormalStyle}"/>
                                <TextBlock Name="txt_fixe" Text="{Binding TelFixe}" Height="30"  />
                            </StackPanel>
                            <StackPanel Margin="0,490,0,60">
                                <TextBlock Text="Tél mobile:" Style="{StaticResource PhoneTextNormalStyle}" />
                                <TextBlock Name="txt_mobile" Text="{Binding TelMobile}" Height="30"  />
                            </StackPanel>
                            <StackPanel Margin="0,560,0,-10">
                                <TextBlock Text="Date de naissance:" Style="{StaticResource PhoneTextNormalStyle}" />
                                <TextBlock Name="txt_dt" Text="{Binding DateNaissance}" Height="30"  />
                            </StackPanel>
                        </Grid>
                    </ScrollViewer>
                </Controls:PivotItem>
                <Controls:PivotItem Header="Scanner">
                    <Rectangle HorizontalAlignment="Left" Margin="0,0,-8,0"
                Name="videoRectangle" Stroke="White" StrokeThickness="5" Width="440" Height="460" VerticalAlignment="Top">
                        <Rectangle.RenderTransform>
                            <RotateTransform x:Name="videoRotateTransform"/>
                        </Rectangle.RenderTransform>
                        <Rectangle.Fill>
                            <VideoBrush x:Name="viewfinderBrush"/>
                        </Rectangle.Fill>
                    </Rectangle>
                </Controls:PivotItem>
                <Controls:PivotItem Header="Rechercher">
                    <StackPanel>
                        <TextBox Name="txt_search" />
                        <ListBox Name="lst_search">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel>
                                        <TextBlock Text="{Binding Nom}" />
                                    </StackPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </StackPanel>
                </Controls:PivotItem>
            </Controls:Pivot>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>